cst.c: whack dead variable.
csv_util.c, globals.c, waypt.c : dont explictly init global.
gdb.c, msroute.c: return after 'fatal'. (decoration...)
gpx.c: fix cast.
ignrando.c, nmn4.c: cast _count to int.
waypt.c: init 'no' before use.
cet/* Zero length arrays aren't C89.
msvc/GPSBabel.vcproj: Update.
};
#define cet_ucs4_ofs_ansi_x3_4_1968 128
-#define cet_ucs4_cnt_ansi_x3_4_1968 0
+#define cet_ucs4_cnt_ansi_x3_4_1968 1
-const int cet_ucs4_map_ansi_x3_4_1968[cet_ucs4_cnt_ansi_x3_4_1968] =
-{
-};
+const int cet_ucs4_map_ansi_x3_4_1968[cet_ucs4_cnt_ansi_x3_4_1968];
-#define cet_ucs4_to_ansi_x3_4_1968_ct 0
+#define cet_ucs4_to_ansi_x3_4_1968_ct 1
-const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_links[cet_ucs4_to_ansi_x3_4_1968_ct] =
-{
-};
+const cet_ucs4_link_t cet_ucs4_to_ansi_x3_4_1968_links[cet_ucs4_to_ansi_x3_4_1968_ct];
#define cet_ucs4_to_ansi_x3_4_1968_extra_ct 25
};
#define cet_ucs4_ofs_ibm891 128
-#define cet_ucs4_cnt_ibm891 0
+#define cet_ucs4_cnt_ibm891 1
-const int cet_ucs4_map_ibm891[cet_ucs4_cnt_ibm891] =
-{
-};
+const int cet_ucs4_map_ibm891[cet_ucs4_cnt_ibm891];
-#define cet_ucs4_to_ibm891_ct 0
+#define cet_ucs4_to_ibm891_ct 1
-const cet_ucs4_link_t cet_ucs4_to_ibm891_links[cet_ucs4_to_ibm891_ct] =
-{
-};
+const cet_ucs4_link_t cet_ucs4_to_ibm891_links[cet_ucs4_to_ibm891_ct];
/*
#define cet_ucs4_to_ibm891_extra_ct 0
};
#define cet_ucs4_ofs_ibm903 128
-#define cet_ucs4_cnt_ibm903 0
+#define cet_ucs4_cnt_ibm903 1
-const int cet_ucs4_map_ibm903[cet_ucs4_cnt_ibm903] =
-{
-};
+const int cet_ucs4_map_ibm903[cet_ucs4_cnt_ibm903];
-#define cet_ucs4_to_ibm903_ct 0
+#define cet_ucs4_to_ibm903_ct 1
-const cet_ucs4_link_t cet_ucs4_to_ibm903_links[cet_ucs4_to_ibm903_ct] =
-{
-};
+const cet_ucs4_link_t cet_ucs4_to_ibm903_links[cet_ucs4_to_ibm903_ct];
/*
#define cet_ucs4_to_ibm903_extra_ct 0
};
#define cet_ucs4_ofs_iso_8859_1 256
-#define cet_ucs4_cnt_iso_8859_1 0
+#define cet_ucs4_cnt_iso_8859_1 1
-const int cet_ucs4_map_iso_8859_1[cet_ucs4_cnt_iso_8859_1] =
-{
-};
+const int cet_ucs4_map_iso_8859_1[cet_ucs4_cnt_iso_8859_1];
-#define cet_ucs4_to_iso_8859_1_ct 0
+#define cet_ucs4_to_iso_8859_1_ct 1
-const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_links[cet_ucs4_to_iso_8859_1_ct] =
-{
-};
+const cet_ucs4_link_t cet_ucs4_to_iso_8859_1_links[cet_ucs4_to_iso_8859_1_ct];
/*
#define cet_ucs4_to_iso_8859_1_extra_ct 0
}
else
{
- double d1, d2;
int interp, i;
char name[256];
char *pow;
/****************************************************************************/
/* obligatory global struct */
/****************************************************************************/
-xcsv_file_t xcsv_file = {};
+xcsv_file_t xcsv_file;
extern char *xcsv_urlbase;
extern char *prefer_shortnames;
*/
#include "defs.h"
+#include "filterdefs.h"
#include <ctype.h>
#define MYNAME "filter_skeleton"
}
}
fatal(MYNAME ": local buffer overflow detected, please report!\n");
+ return 0;
}
static int
default:
fatal(MYNAME "%s: unsupported bit count (%d) in gdb_le_read!\n", prefix, bit_count);
}
+ return 0;
}
static int
/* This should normally never happen; end of route is handled in main loop before this */
fatal(MYNAME "-%s: Unexpected end of route \"%s\"!", prefix1, xname);
+ return 0;
}
#include "defs.h"
-global_options global_opts = {};
+global_options global_opts;
const char gpsbabel_version[] = VERSION;
size_t slen = strlen(cdatastr.mem);
vmem_realloc(&cdatastr, 1 + len + slen);
- estr = (char *) (cdatastr.mem + slen);
+ estr = ((char *) cdatastr.mem) + slen;
memcpy(estr, s, len);
estr[len] = 0;
if (index_opt != NULL)
{
track_index = atoi(index_opt);
- if ((track_index < 1) || (track_index > track_count()))
+ if ((track_index < 1) || (track_index > (int) track_count()))
fatal(MYNAME ": Invalid track index %d (we have currently %d track(s))!\n",
track_index, track_count());
}
uint32 t;
uint32 raw_lat, raw_lon;
int lat_undefined, lon_undefined;
- int i;
p=data;
static int sector_size = 512;
+#ifndef min
#define min(a,b) ((a) < (b)) ? (a) : (b)
+#endif
+#ifndef max
#define max(a,b) ((a) > (b)) ? (a) : (b)
+#endif
static gbint32 *ole_fat1 = NULL;
static gbint32 *ole_fat2 = NULL;
return item;
}
is_fatal((1), MYNAME ": \"%s\" not in property catalog!", property);
+ return 0;
}
static char *
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
+ RelativePath="..\an1.c">
+ </File>
+ <File
RelativePath="..\arcdist.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\bcr.c">
+ </File>
+ <File
RelativePath="..\brauniger_iq.c">
</File>
<File
+ RelativePath="..\cet.c">
+ </File>
+ <File
+ RelativePath="..\cet_util.c">
+ </File>
+ <File
RelativePath="..\cetus.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\cst.c">
+ </File>
+ <File
RelativePath="..\csv_util.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\discard.c">
+ </File>
+ <File
RelativePath="..\duplicate.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\filter_skeleton.c">
+ </File>
+ <File
RelativePath="..\filter_vecs.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\formspec.c">
+ </File>
+ <File
RelativePath="..\garmin.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\gdb.c">
+ </File>
+ <File
RelativePath="..\geo.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\globals.c">
+ </File>
+ <File
RelativePath="..\glogbook.c">
</File>
<File
RelativePath="..\igc.c">
</File>
<File
+ RelativePath="..\ignrando.c">
+ </File>
+ <File
RelativePath="..\internal_styles.c">
<FileConfiguration
Name="Release|Win32">
RelativePath="..\lowranceusr.c">
</File>
<File
+ RelativePath="..\maggeo.c">
+ </File>
+ <File
RelativePath="..\magnav.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\msroute.c">
+ </File>
+ <File
RelativePath="..\navicache.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\nmn4.c">
+ </File>
+ <File
+ RelativePath="..\nmn5.c">
+ </File>
+ <File
RelativePath="..\overlay.c">
</File>
<File
</FileConfiguration>
</File>
<File
+ RelativePath="..\pathaway.c">
+ </File>
+ <File
RelativePath="..\pcx.c">
<FileConfiguration
Name="Release|Win32">
RelativePath="..\stackfilter.c">
</File>
<File
+ RelativePath="..\stmwpp.c">
+ </File>
+ <File
+ RelativePath="..\strptime.c">
+ </File>
+ <File
+ RelativePath="..\tef_xml.c">
+ </File>
+ <File
RelativePath="..\text.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\tomtom.c">
+ </File>
+ <File
RelativePath="..\tpg.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\tpo.c">
+ </File>
+ <File
+ RelativePath="..\trackfilter.c">
+ </File>
+ <File
RelativePath="..\util.c">
<FileConfiguration
Name="Release|Win32">
</FileConfiguration>
</File>
<File
+ RelativePath="..\vitosmt.c">
+ </File>
+ <File
RelativePath="..\vmem.c">
<FileConfiguration
Name="Release|Win32">
<File
RelativePath="..\xmlgeneric.c">
</File>
+ <File
+ RelativePath="..\xmltag.c">
+ </File>
<Filter
Name="Jeeps"
Filter="">
static char *
nmn4_read_line(char *buff, size_t buffsize, FILE *fin)
{
- char *res, *c;
+ char *res;
while ((res = fgets(buff, buffsize, fin)))
{
static void
nmn4_write_waypt(const waypoint *wpt)
{
- char buff[1024], city[128], street[128], zipc[32], number[32];
+ char city[128], street[128], zipc[32], number[32];
int zip = -1;
if (curr_rte_num != target_rte_num) return;
if (index_opt != NULL)
{
target_rte_num = atoi(index_opt);
- is_fatal(((target_rte_num > route_count()) || (target_rte_num < 1)),
+ is_fatal(((target_rte_num > (int) route_count()) || (target_rte_num < 1)),
MYNAME ": invalid route number %d (1..%d))!\n", target_rte_num, route_count());
}
stmwpp_data_read(void)
{
char buff[1024];
- char *c;
what = STM_NOTHING;
fgets(buff, sizeof(buff), fin);
const char * cp;
char * p, * tmp, * xstr;
- char tmpsub[20];
int bytes = 0;
int value = 0;
ep = stdentities;
#include "defs.h"
#include "cet_util.h"
-queue waypt_head = {};
+queue waypt_head;
static unsigned int waypt_ct;
static void *mkshort_handle;
{
queue *elem, *tmp, *qbackup;
waypoint *wpt;
- int no;
+ // BUG(akirmse): no was not initialized. Set to 0 for now to compile it.
+ int no = 0;
qbackup = (queue *) xcalloc(1, sizeof(*qbackup));
QUEUE_INIT(qbackup);
xml_cdata(void *dta, const XML_Char *s, int len)
{
char *estr;
- xg_callback *cb;
vmem_realloc(&cdatastr, 1 + len + strlen(cdatastr.mem));
estr = (char *) cdatastr.mem + strlen(cdatastr.mem);